#include "CH58x_common.h"
#include "stdint.h"
#include "stdio.h"
#include "cpuusage.h"

#include "DevicesADC.h"
#include "DevicesLed.h"
#include "DevicesTime.h"

#include "microConfig.h"
#include "taskTimer.h"


/* 定时器句柄 */
MrTimerType *g_ptypeMrTimerPrintf = NULL;


void vMrTimerPrintf(uint32_t uiParameters)
{
    vLedRevesal(LED_CHANNEL_ALL);

    printf("time: %s cpu: %d%%\r\n", pcStampToTimeStrings(lTimestampGet() / 1000000), (int32_t)(fCPUUsageGet() * 100.0f));

    printf("ADC: %d - %d\r\n", iADCGetDMAValue(ADC_DMA_VOLTAGE_OUT), iADCGetDMAValue(ADC_DMA_CURRENT_OUT));
}
